<script setup>
	import { ref, reactive } from 'vue'

	// 不用对象
	const color = ref('red')

	// 直接是对象
	const obj = reactive({
		color: 'green',
		background: 'purple'
	})
</script>


<template>
	<div>
		<p :style="{color: color}">style1</p>
		<p :style="obj">style2</p>
	</div>
</template>


<style scoped></style>